REM ************************* Video Rec ***********************
REM This is the Script file of video rec
REM Project: SL203
REM Release Date: 2011/08/29
REM Author: WeiLee
REM v0.0010: Init Version. Port from S9E14

5  FOREIGN PowerSaving(0)
10 SYSTEM KeyEventDisable()

REM *** Delete All ***
REM ******************
100 LET DEL_FlG = 0
110 IF DEL_FlG == 1 THEN 120 ELSE 200

120 LET lcdprint = "Delete all Start"
130 SYSTEM ScreenString(10,70,lcdprint)
140 SYSTEM delay_us(1000000)
150 LET deleteresult = 0
160 FOREIGN deleteresult = FM_DeleteAllFileObjectHandle(0)
170 LET lcdprint = "Delete all End"
180 SYSTEM ScreenString(10,100,lcdprint)
190 SYSTEM delay_us(2000000)

REM *** Switch to Video mode ***
REM ****************************
REM AutoMode: 0
REM VideoMode: 5
REM PMode:6
200 FOREIGN SwitchMode(5)
210 SYSTEM delay_us(5000000)
220 LET lcdprint = "Video Rec Test"
230 SYSTEM ScreenString(10,40,lcdprint)
240 SYSTEM delay_us(1000000)
250 FOREIGN OneCard_RunScriptInit()

REM *** Take one 3 sec video ***
REM ************************
320 FOREIGN TakeVideo(0)
370 LET DelayTime = 3000000
380 SYSTEM delay_us(DelayTime)
390 FOREIGN SwitchMode(5)



REM 500 FOREIGN ret = OneCard_FlgSet(1)
510 LET lcdprint = "Complete"
520 SYSTEM ScreenString(10,40,lcdprint)
530 SYSTEM delay_us(1000000)
550 FOREIGN OneCardTest(1)

600 SYSTEM KeyEventEnable()

1000 END
RUN
